package com.gy.ai.agent.platform.siliconflow.entity;

import com.gy.ai.agent.core.BaseResponse;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * @author LGY
 * Create by 2025/6/17 15:27
 */
@Data
@Accessors(chain = true)
public class SiliconflowRerankResp extends BaseResponse implements Serializable {

    private String id;

    private List<Results> results;

    private Meta meta;

    @Data
    @Accessors(chain = true)
    public static class Meta implements Serializable {
        private billedUnits billed_units;
        private Tokens tokens;
    }

    @Data
    @Accessors(chain = true)
    public static class billedUnits implements Serializable {
        private Long input_tokens;
        private Long output_tokens;
        private Long search_units;
        private Long classifications;
    }

    @Data
    @Accessors(chain = true)
    public static class Tokens implements Serializable {
        private Long input_tokens;
        private Long output_tokens;
    }

    @Data
    @Accessors(chain = true)
    public static class Results implements Serializable {
        private Document document;
        private Integer index;
        private BigDecimal relevance_score;
    }

    @Data
    @Accessors(chain = true)
    public static class Document implements Serializable {
        private String text;
    }
}
